<{include file="top.html" }>
</head>
<body>
    <div class="xy-panel">
        <div class="xy-panel-top">
            <div class="xy-titlebar">
                <div class="xy-titlebar-left">
                    <a class="insertBefore_left_arrow_gray" href="javascript:void(0);"></a>
                </div>
                <div class="xy-titlebar-title"><{if $objType == 1}>报名用户<{else}>活动入选用户<{/if}></div>
                <div class="xy-titlebar-right"></div>
            </div>
        </div>
        <div class="xy-panel-content" style="bottom:0; background:#FFF;">
            <div class="xy-row vDirectionRow">
                <ul class="get_praise praise-comment">

                </ul>
            </div>
        </div>
    </div>

    <{include file="signBody.html"}>
</body>
</html>
<script src="<{$resUrl}>Wap/js/flexible.js?v=<{$resVersion}>"></script>
<script>
    var objType="<{$objType}>";
    var objID="<{$objID}>";


    //拖动加载
    var flagData = true;
    var flagAjax = true;
    var page=1;

    function load_more(){
        if(! flagAjax){
            return false;
        }
        flagAjax = false;
        loadObj = layer.load(2);
        $.getJSON("<{u('Events/loadMoreLog')}>", {page:page,type:objType,id:objID}, function(data){
            layer.close(loadObj);
            flagAjax = true;
            if(data.status!=0){
                flagData = false;
            } else {
                $(".praise-comment").append(data.dataHTML);
                fixUserHead();
                page++;
                if(data.isPage == 0){
                    flagData = false;
                }
            }
        });
    }

    var tmp_scroll = 0;
    $('.xy-panel-content').scroll(function () {
        if (tmp_scroll == $(this).height() + $(this).scrollTop()) {
            return;
        }
        tmp_scroll = $(this).height() + $(this).scrollTop();
        var jia_scroll = $(this)[0].scrollHeight - tmp_scroll;
        if (jia_scroll < 100 && flagData) {
            load_more();
        }
    });
    load_more();

</script>

